﻿<%@ Page Language="C#" MasterPageFile="~/web.master" AutoEventWireup="true" CodeBehind="user_list.aspx.cs" Inherits="Shuba.Web.admin.user_list"%>
<%@ Register Assembly="Shuba.Framework" Namespace="Shuba.Framework" TagPrefix="cc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table class="text" border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr>
        <td class="text bg_content" bgcolor="#FFFFFF" align="center"><p>&nbsp;</p>
			<table class="black" border="0" width="95%" cellspacing="0" cellpadding="0">
				<tr>
					<td class="title_back">
					    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="0">
					    <tr>
					    <td class="title_back2" width="2%">&nbsp;</td>
					    <td class="title_back2 title_white" width="38%"><asp:Label ID="LabelTitle" runat="server" Text="Label"></asp:Label></td>
					    <td><span class="title_right"></span></td>
					    </tr>
					    </table>
					</td>
					<td class="title_back" align="right"><br>&nbsp;</td>
				</tr>
				<tr>
					<td class="border_left bg_subtitle_white"><img src="../images/trans.gif" width="5" height="5" border="0" /></td>
					<td class="border_right bg_subtitle" align="right" valign="middle">
					    NIP / User Name&nbsp;<asp:TextBox ID="txtSearch" CssClass="text" runat="server" Width="250px"></asp:TextBox>&nbsp;
                        <asp:Button ID="btnSearch" CssClass="buttonsmall" runat="server" Text="Search" onclick="btnSearch_Click" />&nbsp;
                        <asp:Button ID="btnExcel" CssClass="button" runat="server" Text="Export to Excel" onclick="btnExcel_Click" />&nbsp;
                    </td>
				</tr>
				<tr>
				    <td class="border" colspan="2">
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                                <cc:SHUBAGrid ID="gvList" DataKeyNames="id"  runat="server" AutoGenerateColumns="False" Width="100%"
                                    AllowPaging="true" PageSize="20" OnPageIndexChanging="gvList_PageIndexChanging"
                                     AllowSorting="True" OnSorting="gvList_OnSorting" OnRowCommand="gvList_RowCommand">
                                    <Columns>
                                        <asp:BoundField DataField="nip" HeaderText="NIP" SortExpression="nip" ItemStyle-CssClass="text" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="120px"></asp:BoundField>
                                        <asp:BoundField DataField="name" HeaderText="USER NAME" SortExpression="name" ItemStyle-CssClass="text" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
                                        <asp:BoundField DataField="loginaddr" HeaderText="LAST LOGIN ADDRESS" SortExpression="loginaddr" ItemStyle-CssClass="text" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
                                        <asp:BoundField DataField="logindate" HeaderText="LAST LOGIN DATE" SortExpression="logindate" ItemStyle-CssClass="text" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd MMM yyyy hh:mm:ss tt}"></asp:BoundField>
                                        <asp:BoundField DataField="islogin" HeaderText="IS LOGIN" SortExpression="islogin" ItemStyle-CssClass="text" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
                                        <asp:BoundField DataField="isactive" HeaderText="IS ACTIVE" SortExpression="isactive" ItemStyle-CssClass="text" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
                                        <asp:TemplateField HeaderStyle-Width="20%" ItemStyle-HorizontalAlign=Center>
                                        <ItemTemplate>
                                            [&nbsp;&nbsp;<asp:LinkButton ID="btnReset" CssClass="line" runat="server" CommandName="Reset" CommandArgument='<%#Eval("id")%>' OnClientClick="return confirm('Are you sure, you want to reset the login status')">Reset Status</asp:LinkButton>&nbsp;&nbsp;]
                                        </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <PagerSettings Mode="Numeric" Visible="true" />
                                    <EmptyDataTemplate>
                                        <table class="text" width=100% cellpadding=0 cellspacing=0><tr><td class="bg_grid2" align=center>NO RECORD FOUND</td></tr></table>
                                    </EmptyDataTemplate>
                                </cc:SHUBAGrid>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="gvList" EventName="PageIndexChanging"/>
                                <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"/>
                            </Triggers>
                        </asp:UpdatePanel>
				    </td>
				</tr>
				<tr>
                    <td colspan="2">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <div id="footLink" class="bg_footer text" runat="server">
                                    <table width="100%">
                                        <tr>
                                            <td class="text">
                                                <asp:ImageButton ID="firstLink" runat="server" CssClass="icon_first" OnClick="linkDataPage_Click"
                                                    ImageUrl="~/images/trans.gif" />
                                                <asp:ImageButton ID="prevLink" runat="server" CssClass="icon_previous" OnClick="linkDataPage_Click"
                                                    ImageUrl="~/images/trans.gif" />
                                                <asp:DropDownList ID="ddlPaging" runat="server" CssClass="text" OnSelectedIndexChanged="ddlPaging_IndexChange"
                                                    AutoPostBack="true">
                                                </asp:DropDownList>
                                                <asp:ImageButton ID="nextLink" runat="server" CssClass="icon_next" OnClick="linkDataPage_Click"
                                                    ImageUrl="~/images/trans.gif" />
                                                <asp:ImageButton ID="lastLink" runat="server" CssClass="icon_last" OnClick="linkDataPage_Click"
                                                    ImageUrl="~/images/trans.gif" />
                                            </td>
                                            <td style="text-align: right">
                                                <asp:Label ID="lblPage" runat="server" Text="Page" CssClass="text"></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="gvList" EventName="PageIndexChanging" />
                                <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
                                <asp:AsyncPostBackTrigger ControlID="ddlPaging" EventName="SelectedIndexChanged" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                </tr>
			</table>
			<p>&nbsp;</p>
        </td>
	</tr>
</table>
</asp:Content>